home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 1.iso
/
ARGONET
/
PD
/
PROGRAMMING
/
DESKLIBC
/
SOURCES.ZIP
/
DeskLib
/
!DLSources
/
Libraries
/
Icon
/
c
/
GetInteger
< prev
next >
Wrap
Text File
|
1995-07-08
|
493b
|
23 lines
#include <stdlib.h>
#include "DeskLib:Wimp.h"
#include "DeskLib:WimpSWIs.h"
#include "DeskLib:Icon.h"
extern int Icon_GetInteger(window_handle w, icon_handle i)
/*
* Gets the given icon's text and returns it in the form of an integer
* numeric value. 0 will be returned from any error/invalid text
*/
{
icon_block istate;
Wimp_GetIconState(w, i, &istate);
if (istate.flags.value & (icon_TEXT | icon_INDIRECTED))
return(atoi(istate.data.indirecttext.buffer));
return(0);
}